﻿package mortal.game.view.forging.view
{
    import Message.Game.*;
    import Message.Public.*;
    import com.gengine.resource.*;
    import com.gengine.utils.*;
    import com.mui.controls.*;
    import com.mui.utils.*;
    import extend.language.*;
    import fl.data.*;
    import flash.display.*;
    import flash.events.*;
    import flash.text.*;
    import flash.utils.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.component.window.*;
    import mortal.game.cache.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.resource.tableConfig.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.display.*;
    import mortal.game.view.common.item.*;
    import mortal.game.view.forging.data.*;
    import mortal.game.view.forging.renderer.*;
    import mortal.game.view.pack.*;
    import mortal.game.view.palyer.*;
    import mortal.game.view.systemSetting.*;
    import mortal.mvc.core.*;
    import mortal.mvc.interfaces.*;

    public class BatRefreshPanel extends BaseWindow
    {
        private var _leftBg:GBitmap;
        private var _equipCombat:BitmapNumberText;
        private var _equipDescText:GTextFiled;
        private var _currPropList:GTileList;
        private var _expect1:GComboBox;
        private var _expect2:GComboBox;
        private var _expect3:GComboBox;
        private var _expect4:GComboBox;
        private var _newPropList:GTileList;
        private var _consumeItem1:BaseItem;
        private var _consumeItem2:BaseItem;
        private var _refreshBtn:GButton;
        private var _stoneAutoBuy:GCheckBox;
        private var _lockAutoBuy:GCheckBox;
        private var _currWashEquip:PlayerEquipItem;
        private var _isGetExpectAttr:Boolean;
        private var _lockNum:int;

        public function BatRefreshPanel(param1:ILayer = null)
        {
            super(param1);
            setSize(775, 497);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            var _loc_3:int = 0;
            super.createDisposedChildrenImpl();
            this._leftBg = UIFactory.gBitmap("", 9, 35, this);
            this.pushUIToDisposeVec(UIFactory.bg(51, 37, 114, 27, this, ImagesConst.CombatTextBg));
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.Forging_Text_EquipCombat, 59, 42, this));
            this._equipCombat = UIFactory.bitmapNumberText(115, 43, "FightInfoNum.png", 12, 15, -1, this);
            this._currWashEquip = UICompomentPool.getUICompoment(PlayerEquipItem);
            this._currWashEquip.setItemStyle(ItemStyleConst.Big, "", 0, 0);
            this._currWashEquip.x = 77;
            this._currWashEquip.y = 105;
            this.addChild(this._currWashEquip);
            var _loc_1:* = GlobalStyle.textFormatBai;
            _loc_1.align = TextFormatAlign.CENTER;
            this._equipDescText = UIFactory.gTextField("", 11, 190, 194, 20, this, _loc_1);
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(41075), 70, 218, 88, 20, this, GlobalStyle.textFormatHuang));
            var _loc_2:int = 0;
            while (_loc_2 < 6)
            {
                
                _loc_3 = 243 + 19 * _loc_2;
                this.pushUIToDisposeVec(UIFactory.bg(25, _loc_3, 145, 19, this, ImagesConst.PanelBg2));
                _loc_2++;
            }
            this._currPropList = UIFactory.tileList(25, 242, 170, 126, this);
            this._currPropList.columnWidth = 168;
            this._currPropList.rowHeight = 19;
            this._currPropList.horizontalGap = 0;
            this._currPropList.verticalGap = 0;
            this._currPropList.setStyle("skin", new Bitmap());
            this._currPropList.setStyle("cellRenderer", RefreshPropCellRenderer);
            this._currPropList.configEventListener(MouseEvent.CLICK, this.onLockClickHandler);
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(41076), 70, 363, 88, 20, this, GlobalStyle.textFormatHuang));
            this._expect1 = UIFactory.gComboBox(24, 387, 168, 23, null, this);
            this._expect2 = UIFactory.gComboBox(24, 413, 168, 23, null, this);
            this._expect3 = UIFactory.gComboBox(24, 439, 168, 23, null, this);
            this._expect4 = UIFactory.gComboBox(24, 465, 168, 23, null, this);
            this.pushUIToDisposeVec(UIFactory.bg(209, 35, 561, 457, this, ImagesConst.PanelBg));
            this._newPropList = UIFactory.tileList(217, 46, 555, 370, this);
            this._newPropList.columnWidth = 134;
            this._newPropList.rowHeight = 173;
            this._newPropList.horizontalGap = 3;
            this._newPropList.verticalGap = 14;
            this._newPropList.setStyle("skin", new Bitmap());
            this._newPropList.setStyle("cellRenderer", BatRefreshCellRenderer);
            this._newPropList.configEventListener(MouseEvent.CLICK, this.onReplaceHandler);
            this.pushUIToDisposeVec(UIFactory.bg(217, 418, 544, 69, this, ImagesConst.InputBg));
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(41077), 245, 445, 53, 20, this, GlobalStyle.textFormatHuang));
            this._consumeItem1 = UICompomentPool.getUICompoment(PackItem);
            this._consumeItem1.setItemStyle(ItemStyleConst.Small, ImagesConst.PackItemBg, 2, 2);
            this._consumeItem1.x = 300;
            this._consumeItem1.y = 433;
            this.addChild(this._consumeItem1);
            this._consumeItem2 = UICompomentPool.getUICompoment(PackItem);
            this._consumeItem2.setItemStyle(ItemStyleConst.Small, ImagesConst.PackItemBg, 2, 2);
            this._consumeItem2.x = 350;
            this._consumeItem2.y = 433;
            this.addChild(this._consumeItem2);
            this._refreshBtn = UIFactory.gButton(Language.getString(41078), 450, 441, 84, 27, this, "BrownBtn");
            this._refreshBtn.mouseChildren = false;
            this._refreshBtn.configEventListener(MouseEvent.CLICK, this.onBatRefreshClick);
            this._stoneAutoBuy = UIFactory.checkBox(Language.getString(41079), 592, 432, 154, 20, this);
            this._lockAutoBuy = UIFactory.checkBox(Language.getString(41080), 592, 459, 154, 20, this);
            this._stoneAutoBuy.configEventListener(Event.CHANGE, this.onCheckBoxChange);
            this._lockAutoBuy.configEventListener(Event.CHANGE, this.onCheckBoxChange);
            LoaderManager.instance.load(ImagesConst.BatRefreshLeftBg + ".swf", this.onLoadCompl);
            return;
        }// end function

        private function onLoadCompl(param1) : void
        {
            if (isDisposed)
            {
                return;
            }
            this._leftBg.bitmapData = param1.bitmapData as BitmapData;
            return;
        }// end function

        override public function show(param1:int = 0, param2:int = 0) : void
        {
            super.show();
            if (ClientSetting.local.getIsDone(IsDoneType.AutoBuyRefreshStone))
            {
                this._stoneAutoBuy.selected = true;
            }
            else
            {
                this._stoneAutoBuy.selected = false;
            }
            if (ClientSetting.local.getIsDone(IsDoneType.AutoBuyRefreshLock))
            {
                this._lockAutoBuy.selected = true;
            }
            else
            {
                this._lockAutoBuy.selected = false;
            }
            return;
        }// end function

        public function updateCombat() : void
        {
            if (this._currWashEquip.itemData)
            {
                this._equipCombat.text = "" + this._currWashEquip.itemData.extInfo.combat;
            }
            return;
        }// end function

        public function updateAllNewCombat(param1:Array) : void
        {
            var _loc_3:int = 0;
            var _loc_4:BatRefreshCellRenderer = null;
            if (this._currWashEquip.itemData)
            {
                _loc_3 = this._currWashEquip.itemData.extInfo.combat;
            }
            var _loc_2:int = 0;
            while (_loc_2 < param1.length)
            {
                
                _loc_4 = this._newPropList.itemToCellRenderer(this._newPropList.getItemAt(_loc_2)) as BatRefreshCellRenderer;
                _loc_4.updateCombat(param1[_loc_2] - _loc_3);
                _loc_4.drawNow();
                _loc_2++;
            }
            return;
        }// end function

        public function updateEquipDesc() : void
        {
            this._equipDescText.htmlText = ItemsUtil.getItemWholeName(this._currWashEquip.itemData, true);
            return;
        }// end function

        public function updateConsumeItem() : void
        {
            var _loc_1:* = ForgingUtil.instance.getLevelRange(this._currWashEquip.itemData.itemInfo.level);
            var _loc_2:* = EquipRefreshConfig.instance.getConsumeItem(_loc_1);
            var _loc_3:* = new ItemData(_loc_2);
            var _loc_4:* = _loc_3.itemInfo.codeUnbind;
            var _loc_5:* = new ItemData(_loc_4);
            var _loc_6:* = new ItemData(410040000);
            this._consumeItem1.itemData = _loc_5;
            if (this._lockNum == 0)
            {
                this._consumeItem2.itemData = null;
            }
            else
            {
                this._consumeItem2.itemData = _loc_6;
                this._consumeItem2.amount = this._lockNum;
            }
            this.updateConsumeState();
            return;
        }// end function

        private function updateConsumeState() : void
        {
            var _loc_1:int = 0;
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            if (this._consumeItem1.itemData)
            {
                _loc_1 = this._consumeItem1.itemData.itemInfo.type;
                _loc_2 = Cache.instance.pack.backPackCache.getItemCountByCategoryAndType(EGroup._EGroupStuff, EStuff._EStuffAdvance, _loc_1);
                _loc_3 = 1;
                if (_loc_3 <= _loc_2)
                {
                    this._consumeItem1.isGray = false;
                }
                else
                {
                    this._consumeItem1.isGray = true;
                }
            }
            if (this._consumeItem2.itemData)
            {
                _loc_4 = this._consumeItem2.itemData.itemInfo.type;
                _loc_5 = Cache.instance.pack.backPackCache.getItemCountByCategoryAndType(EGroup._EGroupStuff, EStuff._EStuffAdvance, _loc_4);
                _loc_6 = this._lockNum;
                if (_loc_6 <= _loc_5)
                {
                    this._consumeItem2.isGray = false;
                }
                else
                {
                    this._consumeItem2.isGray = true;
                }
            }
            return;
        }// end function

        private function checkHasMatchAttr(param1:DataProvider) : Boolean
        {
            var _loc_5:int = 0;
            var _loc_6:String = null;
            var _loc_7:String = null;
            var _loc_8:int = 0;
            var _loc_9:Array = null;
            var _loc_10:String = null;
            var _loc_11:RefreshPropVO = null;
            var _loc_12:int = 0;
            var _loc_13:String = null;
            var _loc_14:int = 0;
            var _loc_2:* = this.getExpectCondition();
            var _loc_3:* = _loc_2.expectAttrAll;
            var _loc_4:* = _loc_2.expectAttr;
            for (_loc_6 in _loc_4)
            {
                
                _loc_5++;
            }
            _loc_7 = this._currWashEquip.itemData.extInfo.refresh_lock;
            _loc_9 = _loc_7 == null ? ([]) : (_loc_7.split(","));
            for each (_loc_10 in _loc_9)
            {
                
                if (_loc_10 != "")
                {
                    _loc_8++;
                }
            }
            if (_loc_3 != 0)
            {
                _loc_12 = _loc_8;
                while (_loc_12 < param1.length)
                {
                    
                    _loc_11 = param1.getItemAt(_loc_12) as RefreshPropVO;
                    if (_loc_3 <= _loc_11.attrStar)
                    {
                        return true;
                    }
                    if (_loc_5 != 0)
                    {
                        for (_loc_13 in _loc_4)
                        {
                            
                            if (_loc_11.attrType == int(_loc_13) && _loc_4[_loc_13] <= _loc_11.attrStar)
                            {
                                return true;
                            }
                        }
                    }
                    _loc_12++;
                }
            }
            else if (_loc_5 != 0)
            {
                _loc_14 = _loc_8;
                while (_loc_14 < param1.length)
                {
                    
                    _loc_11 = param1.getItemAt(_loc_14) as RefreshPropVO;
                    for (_loc_13 in _loc_4)
                    {
                        
                        if (_loc_11.attrType == int(_loc_13) && _loc_4[_loc_13] <= _loc_11.attrStar)
                        {
                            return true;
                        }
                    }
                    _loc_14++;
                }
            }
            return false;
        }// end function

        private function isTargetRefresh() : Boolean
        {
            var _loc_2:Object = null;
            var _loc_1:int = 0;
            while (_loc_1 < this._newPropList.length)
            {
                
                _loc_2 = this._newPropList.getItemAt(_loc_1);
                if (_loc_2.hasExpectAttr)
                {
                    return true;
                }
                _loc_1++;
            }
            return false;
        }// end function

        public function updateCurrInfo(param1:DataProvider) : void
        {
            this._currPropList.dataProvider = param1;
            this._currPropList.sortItems(this.sortOnLockState);
            this._currPropList.drawNow();
            return;
        }// end function

        public function updateNewInfo(param1:Array) : void
        {
            var _loc_2:Object = null;
            var _loc_5:DataProvider = null;
            var _loc_6:Boolean = false;
            var _loc_7:int = 0;
            var _loc_3:int = 1;
            var _loc_4:* = new DataProvider();
            this._isGetExpectAttr = false;
            for each (_loc_5 in param1)
            {
                
                _loc_2 = new Object();
                _loc_2.propData = _loc_5;
                _loc_2.index = _loc_3 + 1;
                _loc_6 = this.checkHasMatchAttr(_loc_5);
                _loc_2.hasExpectAttr = _loc_6;
                if (_loc_6)
                {
                    this._isGetExpectAttr = true;
                }
                _loc_4.addItem(_loc_2);
            }
            if (param1.length < 8)
            {
                _loc_7 = 0;
                while (_loc_7 < 8 - param1.length)
                {
                    
                    _loc_2 = new Object();
                    _loc_2.propData = new DataProvider();
                    _loc_4.addItem(_loc_2);
                    _loc_7++;
                }
            }
            this._newPropList.dataProvider = _loc_4;
            this._newPropList.drawNow();
            return;
        }// end function

        private function onLockClickHandler(event:MouseEvent) : void
        {
            var _loc_2:RefreshPropCellRenderer = null;
            var _loc_3:RefreshPropVO = null;
            var _loc_4:Dictionary = null;
            if (event.target is Sprite)
            {
                _loc_2 = this._currPropList.itemToCellRenderer(this._currPropList.selectedItem) as RefreshPropCellRenderer;
                _loc_3 = this._currPropList.selectedItem as RefreshPropVO;
                _loc_3.isLock = !_loc_3.isLock;
                _loc_2.data = _loc_3;
                this._currPropList.sortItems(this.sortOnLockState);
                _loc_2.drawNow();
                _loc_4 = new Dictionary();
                _loc_4["dataProvider"] = this._currPropList.dataProvider;
                _loc_4["isLock"] = _loc_3.isLock;
                Dispatcher.dispatchEvent(new DataEvent(EventName.SynchRefreshLock, _loc_4));
            }
            return;
        }// end function

        private function onReplaceHandler(event:MouseEvent) : void
        {
            var _loc_2:Object = null;
            var _loc_3:Object = null;
            if (event.target is GButton)
            {
                _loc_2 = this._newPropList.selectedItem;
                _loc_3 = {};
                _loc_3.equipUid = this._currWashEquip.itemData.uid;
                _loc_3.replaceIndex = _loc_2.index;
                Dispatcher.dispatchEvent(new DataEvent(EventName.EquipRefreshReplace, _loc_3));
            }
            return;
        }// end function

        private function sortOnLockState(param1:RefreshPropVO, param2:RefreshPropVO) : int
        {
            if (param1.isLock && !param2.isLock)
            {
                return -1;
            }
            if (!param1.isLock && param2.isLock)
            {
                return 1;
            }
            return this.sortOnPosition(param1, param2);
        }// end function

        private function sortOnPosition(param1:RefreshPropVO, param2:RefreshPropVO) : int
        {
            if (param1.pos < param2.pos)
            {
                return -1;
            }
            return 1;
        }// end function

        private function onBatRefreshClick(event:MouseEvent) : void
        {
            var _loc_3:int = 0;
            var _loc_5:RefreshPropVO = null;
            if (!this._currWashEquip.itemData)
            {
                MsgManager.showRollTipsMsg(Language.getString(41081));
                return;
            }
            var _loc_2:* = new Dictionary();
            var _loc_4:int = 0;
            while (_loc_4 < this._currPropList.length)
            {
                
                _loc_5 = this._currPropList.getItemAt(_loc_4) as RefreshPropVO;
                if (_loc_5.isLock)
                {
                    _loc_2[_loc_5.pos] = 1;
                    _loc_3++;
                }
                _loc_4++;
            }
            if (_loc_3 == ForgingConst.MaxRefreshPropNum)
            {
                MsgManager.showRollTipsMsg(Language.getString(41082));
                return;
            }
            if (this.isTargetRefresh())
            {
                Alert.show(Language.getString(41083), null, Alert.OK | Alert.CANCEL, null, this.onAlertClick);
                return;
            }
            this.doBatRefresh();
            return;
        }// end function

        private function onAlertClick(param1:int) : void
        {
            if (param1 == Alert.OK)
            {
                this.doBatRefresh();
            }
            return;
        }// end function

        private function doBatRefresh() : void
        {
            var _loc_7:RefreshPropVO = null;
            var _loc_1:Object = {};
            var _loc_2:* = new EPriorityType(EPriorityType._EProiorityTypeBindFirst);
            var _loc_3:* = new Dictionary();
            var _loc_4:* = new EOperType(EOperType._EoperTypeBatch);
            var _loc_5:* = this.getExpectCondition();
            var _loc_6:int = 0;
            while (_loc_6 < this._currPropList.length)
            {
                
                _loc_7 = this._currPropList.getItemAt(_loc_6) as RefreshPropVO;
                if (_loc_7.isLock)
                {
                    _loc_3[_loc_7.pos] = 1;
                }
                _loc_6++;
            }
            _loc_1.equipUid = this._currWashEquip.itemData.uid;
            _loc_1.type = _loc_4;
            _loc_1.priority = _loc_2;
            _loc_1.lockDict = _loc_3;
            _loc_1.expectAttr = _loc_5.expectAttr;
            _loc_1.expectAttrAll = _loc_5.expectAttrAll;
            _loc_1.autoBuyRefreshTone = this._stoneAutoBuy.selected;
            _loc_1.autoBuyLockMaterial = this._lockAutoBuy.selected;
            Dispatcher.dispatchEvent(new DataEvent(EventName.EquipRefresh, _loc_1));
            return;
        }// end function

        private function getExpectCondition() : Object
        {
            var _loc_9:Object = null;
            var _loc_1:* = this._expect1.selectedItem;
            var _loc_2:* = this._expect2.selectedItem;
            var _loc_3:* = this._expect3.selectedItem;
            var _loc_4:* = this._expect4.selectedItem;
            var _loc_5:Array = [];
            _loc_5.push(_loc_1);
            _loc_5.push(_loc_2);
            _loc_5.push(_loc_3);
            _loc_5.push(_loc_4);
            var _loc_6:* = new Object();
            var _loc_7:* = new Dictionary();
            var _loc_8:int = 100;
            for each (_loc_9 in _loc_5)
            {
                
                if (_loc_9 && _loc_9.type != 0)
                {
                    if (_loc_9.type == -1)
                    {
                        _loc_8 = _loc_9.star < _loc_8 ? (_loc_9.star) : (_loc_8);
                        continue;
                    }
                    if (_loc_7[_loc_9.type])
                    {
                        _loc_7[_loc_9.type] = _loc_9.star < _loc_7[_loc_9.type] ? (_loc_9.star) : (_loc_7[_loc_9.type]);
                        continue;
                    }
                    _loc_7[_loc_9.type] = _loc_9.star;
                }
            }
            _loc_6["expectAttr"] = _loc_7;
            _loc_6["expectAttrAll"] = _loc_8 == 100 ? (0) : (_loc_8);
            return _loc_6;
        }// end function

        public function updateExpectProp() : void
        {
            var _loc_1:int = 0;
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            var _loc_4:Array = null;
            var _loc_5:Array = null;
            var _loc_6:Array = null;
            var _loc_7:Object = null;
            var _loc_8:HashMap = null;
            var _loc_9:String = null;
            var _loc_10:String = null;
            var _loc_11:int = 0;
            var _loc_12:Object = null;
            this._expect1.removeAll();
            this._expect2.removeAll();
            this._expect3.removeAll();
            this._expect4.removeAll();
            this._expect1.addItem({label:Language.getString(41084), type:0});
            this._expect2.addItem({label:Language.getString(41084), type:0});
            this._expect3.addItem({label:Language.getString(41084), type:0});
            this._expect4.addItem({label:Language.getString(41084), type:0});
            if (this._currWashEquip && this._currWashEquip.itemData)
            {
                _loc_1 = ForgingUtil.instance.getLevelRange(this._currWashEquip.itemData.itemInfo.level);
                _loc_2 = EquipRefreshConfig.instance.getMaxStarLevel(_loc_1);
                _loc_3 = this._currWashEquip.itemData.itemInfo.type;
                _loc_4 = GameDefConfig.instance.getItem("EquipType", EEquipType._EEquipTypeAttack).text.split(",");
                _loc_5 = GameDefConfig.instance.getItem("EquipType", EEquipType._EEquipTypeDefense).text.split(",");
                _loc_6 = [_loc_2 - 2, (_loc_2 - 1), _loc_2];
                _loc_7 = new Object();
                _loc_8 = new HashMap();
                if (_loc_4.indexOf(_loc_3 + "") != -1)
                {
                    _loc_9 = Language.getString(41085);
                    _loc_7 = {str:EFightRoleAttribute._EFightRoleAttributeAttack};
                    _loc_9 = Language.getString(41086);
                    _loc_8.push(_loc_9, -1);
                    _loc_9 = Language.getString(41087);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributePenetration);
                    _loc_9 = Language.getString(41088);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributeCrit);
                    _loc_9 = Language.getString(41089);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributeHit);
                    _loc_9 = Language.getString(41090);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributeExpertise);
                    _loc_9 = Language.getString(41091);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributeMaxMana);
                }
                else if (_loc_5.indexOf(_loc_3 + "") != -1)
                {
                    _loc_9 = Language.getString(41092);
                    _loc_7 = {str:EFightRoleAttribute._EFightRoleAttributeMaxLife};
                    _loc_9 = Language.getString(41086);
                    _loc_8.push(_loc_9, -1);
                    _loc_9 = Language.getString(41093);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributePhysDefense);
                    _loc_9 = Language.getString(41094);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributeMagicDefense);
                    _loc_9 = Language.getString(41095);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributeToughness);
                    _loc_9 = Language.getString(41096);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributeJouk);
                    _loc_9 = Language.getString(41097);
                    _loc_8.push(_loc_9, EFightRoleAttribute._EFightRoleAttributeBlock);
                }
                for (_loc_10 in _loc_7)
                {
                    
                    for each (_loc_11 in _loc_6)
                    {
                        
                        _loc_12 = {};
                        _loc_12.label = _loc_10 + _loc_11 + Language.getString(41098);
                        _loc_12.type = _loc_7[_loc_10];
                        _loc_12.star = _loc_11;
                        this._expect1.addItem(_loc_12);
                    }
                }
                for each (_loc_10 in _loc_8.keys)
                {
                    
                    for each (_loc_11 in _loc_6)
                    {
                        
                        _loc_12 = {};
                        _loc_12.label = _loc_10 + _loc_11 + Language.getString(41098);
                        _loc_12.type = _loc_8.getValue(_loc_10);
                        _loc_12.star = _loc_11;
                        this._expect2.addItem(_loc_12);
                        this._expect3.addItem(_loc_12);
                        this._expect4.addItem(_loc_12);
                    }
                }
            }
            return;
        }// end function

        public function clearUI() : void
        {
            var _loc_3:Object = null;
            this._currPropList.dataProvider = new DataProvider();
            var _loc_1:* = new DataProvider();
            var _loc_2:int = 0;
            while (_loc_2 < 8)
            {
                
                _loc_3 = new Object();
                _loc_3.propData = new DataProvider();
                _loc_1.addItem(_loc_3);
                _loc_2++;
            }
            this._newPropList.dataProvider = _loc_1;
            this._newPropList.drawNow();
            this._expect1.removeAll();
            this._expect2.removeAll();
            this._expect3.removeAll();
            this._expect4.removeAll();
            this._expect1.addItem({label:Language.getString(41076), type:0});
            this._expect2.addItem({label:Language.getString(41076), type:0});
            this._expect3.addItem({label:Language.getString(41076), type:0});
            this._expect4.addItem({label:Language.getString(41076), type:0});
            this._equipCombat.text = "";
            this._equipDescText.text = "";
            this._currWashEquip.itemData = null;
            this._consumeItem1.itemData = null;
            this._consumeItem2.itemData = null;
            this._currWashEquip.updateStrengLevel();
            return;
        }// end function

        private function onCheckBoxChange(event:Event) : void
        {
            if (event.target == this._stoneAutoBuy)
            {
                ClientSetting.local.setIsDone(this._stoneAutoBuy.selected, IsDoneType.AutoBuyRefreshStone);
            }
            else if (event.target == this._lockAutoBuy)
            {
                ClientSetting.local.setIsDone(this._lockAutoBuy.selected, IsDoneType.AutoBuyRefreshLock);
            }
            return;
        }// end function

        public function set currWashEquip(param1:PlayerEquipItem) : void
        {
            this._currWashEquip.itemData = param1.itemData;
            this._currWashEquip.updateStrengLevel();
            this._isGetExpectAttr = false;
            return;
        }// end function

        public function get isGetExpectAttr() : Boolean
        {
            return this._isGetExpectAttr;
        }// end function

        public function get lockNum() : int
        {
            return this._lockNum;
        }// end function

        public function set lockNum(param1:int) : void
        {
            this._lockNum = param1;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._currPropList.dispose(param1);
            this._expect1.dispose(param1);
            this._expect2.dispose(param1);
            this._expect3.dispose(param1);
            this._expect4.dispose(param1);
            this._refreshBtn.dispose(param1);
            this._newPropList.dispose(param1);
            this._equipCombat.dispose(param1);
            this._currWashEquip.dispose(param1);
            this._equipDescText.dispose(param1);
            this._consumeItem1.dispose(param1);
            this._consumeItem2.dispose(param1);
            this._stoneAutoBuy.dispose(param1);
            this._lockAutoBuy.dispose(param1);
            this._leftBg.dispose(param1);
            this._currPropList = null;
            this._expect1 = null;
            this._expect2 = null;
            this._expect3 = null;
            this._expect4 = null;
            this._currWashEquip = null;
            this._refreshBtn = null;
            this._newPropList = null;
            this._equipCombat = null;
            this._equipDescText = null;
            this._consumeItem1 = null;
            this._consumeItem2 = null;
            this._stoneAutoBuy = null;
            this._lockAutoBuy = null;
            this._leftBg = null;
            this._lockNum = 0;
            return;
        }// end function

    }
}
